<template>
  <div id="app">

    <router-view/>
  </div>
</template>

<script>
export  default {
  destroyed() {
    window.addEventListener("beforeunload",this.closeWindow)
  },
  methods:{
    closeWindow(){
      localStorage.removeItem("token");  // 清除浏览器存储信息---只清除user
      localStorage.clear();// 清除浏览器存储信息---全部清除
    }
  }
}

</script>

<style lang="less">

</style>
